import request from '@/utils/request'

export default {
  //敏感词管理
  sensitiveList(data) {
    return request({
      url: '/posterSensitiveWord/list',
      method: 'post',
      data
    })
  },
  addSensitive(data) {
    return request({
      url: '/posterSensitiveWord/add',
      method: 'post',
      data
    })
  },
  editSensitive(data) {
    return request({
      url: '/posterSensitiveWord/edit',
      method: 'post',
      data
    })
  },
  delSensitive(id) {
    return request({
      url: `/posterSensitiveWord/delete/${id}`,
      method: 'delete',
    })
  },
  topicList(data) {
    return request({
      url: '/posterTopic/queryByList',
      method: 'post',
      data
    })
  },
  addTopic(data) {
    return request({
      url: '/posterTopic/add',
      method: 'post',
      data
    })
  },
  editTopic(data) {
    return request({
      url: '/posterTopic/edit',
      method: 'post',
      data
    })
  },
  statusTopic(data) {
    return request({
      url: `/posterTopic/editStats/${data.id}/${data.showStatus}`,
      method: 'POST',
    })
  },
  hotTopic(data) {
    return request({
      url: `/posterTopic/editHot/${data.id}/${data.orderNum}`,
      method: 'POST',
    })
  },
  userList(data) {
    return request({
      url: '/poster/userPage',
      method: 'post',
      data
    })
  },
  auditList(data) {
    return request({
      url: '/poster/page',
      method: 'post',
      data
    })
  },
  editAudit(data) {
    return request({
      url: '/poster/batchEdit',
      method: 'post',
      data
    })
  },
  setAudit(data) {
    return request({
      url: '/poster/batchAudit',
      method: 'post',
      data
    })
  },
  delAudit(data) {
    return request({
      url: '/poster/batchDelete',
      method: 'post',
      data
    })
  },
  auditDetail(id) {
    return request({
      url: `/poster/detail?id=${id}`,
      method: 'get',
    })
  },
  commentList(data){
    return request({
      url: '/posterComment/page',
      method: 'post',
      data
    })
    
  },
  setComment(data) {
    console.log(data);
    return request({
      url: `/posterComment/audit`,
      method: 'POST',
      data
    })
  },
  editComment(data){
    return request({
      url: '/posterComment/edit',
      method: 'POST',
      data
    })
  },
  delComment(data) {
    return request({
      url: `/posterComment/delete/${data.id}`,
      method: 'POST',
    })
  },


}
